on:
  push:
    branches:
      - master

name: Release Packaging

jobs:
  release:
    name: Release Packaging    
    env:
      PROJECT_NAME_UNDERSCORE: rust_ddd_example_shop
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true
      - name: Release Build
        working-directory: shop
        run: cargo build --release
      - name: 'Upload Artifact'
        working-directory: shop
        uses: actions/upload-artifact@v2
        with:
          name: ${{ env.PROJECT_NAME_UNDERSCORE }}
          path: target/release/${{ env.PROJECT_NAME_UNDERSCORE }}

